package cn.org.rapid_framework.generator;


/**
 * 
 * @author badqiu
 * @email badqiu(a)gmail.com
 */

public class GeneratorMain {
	/**
	 * 请直接修改以下代码调用不同的方法以执行相关生成任务.
	 */
	public static void main(String[] args) throws Exception {
		GeneratorFacade g = new GeneratorFacade();
		g.deleteOutRootDir();							//删除生成器的输出目录
//		g.generateByTable("T_APP","template");
//		g.generateByTable("T_BUTTON","template");
//		g.generateByTable("T_COMPLAINT","template");
//		g.generateByTable("T_DEPT","template");
//		g.generateByTable("T_FEEDBACK","template");
//		g.generateByTable("T_LOG","template");
//		g.generateByTable("T_MENU","template");
//		g.generateByTable("T_QUESTION","template");
//		g.generateByTable("T_ROLE","template");
//		g.generateByTable("T_ROLE_MENU","template");
//		g.generateByTable("T_ROLE_MENU_BUTTON","template");
		g.generateByTable("T_SYS_MESSAGE","template");
//		g.generateByTable("T_USER","template");
//		g.generateByTable("T_USER_ROLE","template");
		
//		g.generateByTable("AT_ACCOUNT","template");
//		g.generateByTable("AT_ACCOUNT_CARD","template");
//		g.generateByTable("AT_ACCOUNT_DETAIL","template");
//		g.generateByTable("AT_ACCOUNT_LOG","template");
//		g.generateByTable("AT_APPRAISAL","template");
//		g.generateByTable("AT_APPRAISAL_PICTURE","template");
//		g.generateByTable("AT_ARTICLE","template");
//		g.generateByTable("AT_ARTICLE_DETAIL","template");
//		g.generateByTable("AT_BRANCH","template");
//		g.generateByTable("AT_CALL","template");
//		g.generateByTable("AT_CALL_MSG","template");
//		g.generateByTable("AT_DOCTOR","template");
//		g.generateByTable("AT_HOSPITAL","template");
//		g.generateByTable("AT_HOSPITAL_BRANCH","template");
//		g.generateByTable("AT_PROFESSION_TITLE","template");
		
//		g.generateByTable("AT_USER_SEARCH","template");
//		g.generateByTable("AT_DISEASE","template");
//		g.generateByTable("AT_DOCTOR_DISEASE","template");
//		g.generateByTable("AT_CLINIC","template");
//		g.generateByTable("AT_ADVERTISING","template");
//		g.generateByTable("AT_LECTURE","template");
		//g.generateByTable("T_VERSION","template");
		//g.generateByTable("AT_DOCTOR_PRAISE","template");
//		g.generateByTable("AT_USER_GRADE","template");
//		g.generateByTable("AT_LECTURE_COMMENT","template");
//		g.generateByTable("AT_LECTURE_PRAISE","template");
//		g.generateByTable("AT_LECTURE_COLLECT","template");
//		g.generateByTable("AT_ARTICLE_COMMENT","template");
//		g.generateByTable("AT_ARTICLE_PRAISE","template");
//		g.generateByTable("AT_ARTICLE_COLLECT","template");
//		g.generateByTable("AT_USER_ATTENTION","template");
//		g.generateByTable("AT_BRANCH_DISEASE","template");
//		g.generateByTable("AT_USER_TOKEN","template");
//		g.generateByTable("AT_DOCTOR_CARD","template");
//		g.generateByTable("AT_DOCTOR_CARD_AUDIT","template");
//		g.generateByTable("AT_CARD_TYPE","template");
		
//		g.generateByTable("T_ORGNIZATION","template");
//		g.generateByTable("T_EMPLOYEE","template");
//		g.generateByTable("T_TEST","template");
		
//		g.generateByTable("OUT_BOX","template");
//		g.generateByTable("SENDED_OUT_BOX","template");
//		g.generateByTable("BAD_OUT_BOX","template");
//		g.generateByTable("IN_BOX","template");
//		g.generateByTable("STATUS_REPORT","template");
//		g.generateByTable("CT_MSG_RESULT","template");
		
//		g.generateByTable("CT_ICON","template");
		
//		g.generateByTable("CT_ACCEPT_ABNORMAL_TYPE","template");
//		g.generateByTable("CT_ACCEPT_ABNORMAL_MSG","template");
//		g.generateByTable("CT_ACCEPT_ABNORMAL","template");
//		g.generateByTable("CT_ACCEPT_ABNORMAL_KEYWORD","template");
		
//		g.generateByTable("CT_PUTON_ABNORMAL_KEYWORD","template");
//		g.generateByTable("CT_PUTON_ABNORMAL_TYPE","template");
//		g.generateByTable("CT_PUTON_ABNORMAL_MSG","template");
//		g.generateByTable("CT_PUTON_ABNORMAL","template");
//		g.generateByTable("CT_CASE_S_PROCESS","template");
		
//		g.generateByTable("CT_CODE","template");
//		g.generateByTable("CT_CODE_GROUP","template");
//		g.generateByTable("CT_PEOPLE","template");
//		g.generateByTable("CT_CASE_SUSPECT_PROCESS","template");
//		g.generateByTable("CT_CASE_SUSPECT","template");
//		g.generateByTable("CT_CASE_DOC_SUSPECT","template");
//		g.generateByTable("CT_CASE_DOCUMENT_FILE","template");
//		g.generateByTable("CT_CASE_DOCUMENT","template");
//		g.generateByTable("CT_CASE_CASUALTY","template");
//		g.generateByTable("CT_CASE_BASE_INFO","template");
//		g.generateByTable("CT_CASE_JCJXX110","template");
//		g.generateByTable("CT_CASE_INFO_110_JZ","template");
//		g.generateByTable("CT_CASE_INFO_JZ","template");
//		g.generateByTable("CT_CASE_DOCUMENT_JZ","template");
		
//		g.generateByTable("CT_PUBLISH_NODE","template");
//		g.generateByTable("CT_PUBLISH_INFO","template");
//		g.generateByTable("CT_PUBLISH_INFO_FLOW","template");
		
//		g.generateByTable("CT_RECORD_INFO","template");
//		g.generateByTable("CT_RECORD_DOCUMENT","template");
//		g.generateByTable("CT_RECORD_PROCESS","template");
//		g.generateByTable("CT_RECORD_NODE","template");
		
//		g.generateByTable("CT_WARNING_NODE","template");
//		g.generateByTable("CT_WARNING_INFO","template");
		
//		g.generateByTable("CT_ACCEPT_XZ_JZ","template");
//		g.generateByTable("CT_ACCEPT_XS_JZ","template");
//		g.generateByTable("CT_ACCEPT_INFO","template");
		

		
//		g.generateByTable("CT_TASK_CONFIG","template");
//		g.generateByTable("CT_TASK_LOG","template");
		
//		g.generateByTable("CT_CASE_TYPE","template");
		
		//g.generateByAllTable("template");	//自动搜索数据库中的所有表并生成文件,template为模板的根目录
//		g.generateByClass(Blog.class,"template_clazz");
		 
//		g.deleteByTable("table_name", "template"); //删除生成的文件
		//打开文件夹
		Runtime.getRuntime().exec("cmd.exe /c start "+GeneratorProperties.getRequiredProperty("outRoot"));
	}
}
